﻿@model LynxWiki.ViewModels.WikiTopicListings
@using LynxWiki.ViewModels

@{
    ViewBag.Title = "Wiki Topic Listing";
}

<h2>Wiki Topic Listing</h2>
@using (Html.BeginForm("ListType", "WikiDirectory", FormMethod.Post, new { id = "ListType" })) {
    <fieldset id="fldListType">
        <legend>Listing Type Selection</legend>
        @foreach (ListTypeSelection fts in Model.Selections) {
            @Html.RadioButtonFor(rb => rb.ListTypeSelected, fts.ID) @fts.ListType
        } <input type="submit" value="Refresh" />
    </fieldset>
}
@if (Model.TopicListing != null && Model.TopicListing.Count > 0) {
    <table class="TableClass">
        <tr>
            <th class="TableCellHighlighted">File</th><th class="TableCellHighlighted">Directory</th><th class="TableCellHighlighted">Created On</th>
            @if (User.IsInRole("WikiAdmin")) {
                <th class="TableCellHighlighted">File Actions</th>
            }
        </tr>
        @Html.DisplayFor(m => m.TopicListing)
    </table>
}
